package com.bgIntlgn.client.entity.jishubu.papaerLibary;

import java.util.Date;

import yuhuibear.poat.annotations.action.AutoGenerateValue;
import yuhuibear.poat.annotations.relation.Field;
import yuhuibear.poat.annotations.relation.Table;
import yuhuibear.poat.object.bean.Bean;

@Table(name = "borrow_records", constrain = "")
public class BorrowRecord implements Bean {

	/**
	 * id
	 */
	@AutoGenerateValue(skipOnNull = true, sqlToGet = "select currval('borrow_records_id_seq')")
	@Field(name = "id", type = "bigserial", constrain = "primary key")
	private Long id;
	/**
	 * 对应的零件， 产品， 或者组件图的id
	 */
	@Field(name = "pic_paper_id", type = "char(100)", constrain = "not null references papers(paper_id) on update cascade on delete cascade")
	private String picPaperId;
	/**
	 * 借出份数
	 */
	@Field(name = "copies", type = "int", constrain = "")
	private Integer copies;
	/**
	 * 借出时间
	 */
	@Field(name = "time", type = "date", constrain = "")
	private Date time;
	/**
	 * 借出员工
	 */
	@Field(name = "borrower_id", type = "int8", constrain = "not null references employees(id) on update cascade on delete cascade")
	private Long borrowerId;

	/**
	 * 备注
	 */
	@Field(name = "comment", type = "varchar(250)", constrain = "")
	private String comment;

	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getPicPaperId() {
		return picPaperId;
	}

	public void setPicPaperId(String picPaperId) {
		this.picPaperId = picPaperId;
	}

	public Integer getCopies() {
		return this.copies;
	}

	public void setCopies(Integer copies) {
		this.copies = copies;
	}

	public Date getTime() {
		return this.time;
	}

	public void setTime(Date time) {
		this.time = time;
	}

	public Long getBorrowerId() {
		return this.borrowerId;
	}

	public void setBorrowerId(Long borrowerId) {
		this.borrowerId = borrowerId;
	}

	public String getComment() {
		return this.comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

}
